package com.qiwenshare.file.api;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.qiwenshare.common.result.RestResult;
import com.qiwenshare.file.domain.user.Role;
import com.qiwenshare.file.domain.user.UserBean;
import com.qiwenshare.file.dto.user.ModifyPasswordDTO;
import com.qiwenshare.file.vo.file.FileListVO;
import com.qiwenshare.file.vo.user.UserAuthVo;
import com.qiwenshare.file.vo.user.UserLoginVo;

import java.util.List;

public interface IUserService extends IService<UserBean> {


    String getUserIdByToken(String token);


    /**
     * 用户注册
     *
     * @param userBean 用户信息
     * @return 结果
     */
    RestResult<String> registerUser(UserBean userBean, List<Long> roleIds);
    RestResult<String> mdoifyUser(UserBean userBean, List<Long> roleIds);
    RestResult<String> deleteUser(UserBean userBean);
    RestResult<String> resetPassword(UserBean userBean);
    RestResult<String> modifyPassword(ModifyPasswordDTO modifyPasswordDTO);

    IPage<UserLoginVo> getUserList(String username, String loginAccount, String workOrder, Long currentPage, Long pageCount);

    UserAuthVo getAuthInfo();

    List<UserBean> getAllUser();


    UserBean findUserInfoByTelephone(String telephone);
    UserBean findUserInfoByLoginAccount(String loginAccount);
    List<Role> selectRoleListByUserId(String userId);
    String getSaltByTelephone(String telephone);
    String getSaltByLoginAccount(String loginAccount);
    UserBean selectUserByTelephoneAndPassword(String username, String password);
    UserBean selectUserByLoginAccountAndPassword(String loginAccount, String password);


    List<UserBean> getEmployeeDepartmentManager(String userId);

    List<UserBean> getArchiveDepartmentManager(String archiveId);

    List<UserBean> getCeoList();
}
